package com.ips.utils.exception;

import lombok.Data;

@Data
public class OperationException extends RuntimeException {
    private Integer code;
    private Throwable throwable;
    private String message;

    public OperationException(Integer code, Throwable throwable) {
        this.code = code;
        this.throwable = throwable;
    }
    public OperationException(String message) {
        this.code = 999;
        this.message = message;
    }

    public OperationException(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public OperationException(Integer code, String message, Throwable throwable) {
        this.code = code;
        this.message = message;
        this.throwable = throwable;
    }

}
